<template>
  <div>
    <nav-bar title="任务整改"></nav-bar>
    <div class="realTimeInspection maxinBox">
      <van-row class="imagesTop">
        <van-col :span="8" v-for="(item, index) in images" :key="index">
          <div>
            <img :src="item">
          </div>
        </van-col>
      </van-row>
      <div>
        <van-cell title="问题类别" :value="$route.params.itemData.cardTitle" />
        <van-cell class="marginTop5" title="截止日期" :value="$route.params.itemData.timeLimit" />
        <van-field
          class="textarea"
          type="textarea"
          v-model="$route.params.itemData.cardDesc"
          name="巡检点要求"
          label="巡检点要求"
          disabled
        />
        <van-cell title="其他详情" is-link to="TaskDetails" />
        <van-field
          class="textarea marginTop5"
          type="textarea"
          v-model="inspectionDesc"
          name="整改描述"
          label="整改描述"
          placeholder="请输入整改描述"
          :rules="[{ required: true, message: '请填写整改描述' }]"
        />
        <van-field name="uploader" label="上传照片">
          <template #input>
            <van-uploader v-model="uploader" />
          </template>
        </van-field>
      </div>
      <div class="marginTop5" style="padding: 0.3125rem 1.25rem;">
        <van-button round block type="info" native-type="onSubmit" @click="onSubmit">
          提交整改
        </van-button>
      </div>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        inspectionDesc: '',
        uploader: [],
        images: ['https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591868469060&di=b51d6761162330726659091d47158a3b&imgtype=0&src=http%3A%2F%2Fwww.zhaji.net.cn%2Fuploads%2Fallimg%2F171107%2F1-1G10G51019A8.jpg', 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591868469060&di=b51d6761162330726659091d47158a3b&imgtype=0&src=http%3A%2F%2Fwww.zhaji.net.cn%2Fuploads%2Fallimg%2F171107%2F1-1G10G51019A8.jpg', 'https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1591868469060&di=b51d6761162330726659091d47158a3b&imgtype=0&src=http%3A%2F%2Fwww.zhaji.net.cn%2Fuploads%2Fallimg%2F171107%2F1-1G10G51019A8.jpg']
      }
    },
    methods: {
      // 提交表单
      onSubmit() {
        alert(1)
      }
    }
  }
</script>